package bairui.international.model.domain.jpa;

import com.lianjing.sh.model.uml.model.data.TBSuper_BaseTimeAndOrderValue;

/**
 *
 * (中奖)TB_WinPrize
 *
 * @说明
 * <pre>

 * </pre>
 *
 * @see Help_TB_WinPrize#inheritance() 继承体系信息
 *
 */
@org.hibernate.annotations.DynamicInsert
@org.hibernate.annotations.DynamicUpdate

@javax.persistence.Entity(name="t_winPrize")
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@SuppressWarnings("serial")
@com.lianjing.sh.model.common.annotation.Comment("中奖")
@com.lianjing.sh.processing.info.annotation.InfoComment("中奖")
public class TB_WinPrize
 extends TBSuper_BaseTimeAndOrderValue
 implements 
	com.lianjing.sh.model.common.stardard.TableModel<bairui.international.model.domain.jpa.id.ID_WinPrize>,
	java.io.Serializable

{

	
	
	/**
	 * 必须属性赋值接口
	 */
	public static interface MustProperties{
		public bairui.international.model.domain.jpa.id.ID_WinPrize getId();
		/** 奖品 */
		public bairui.international.model.domain.jpa.TB_PrizeItem getPrizeItem();
		/** 非奖品标志 */
		public Boolean getNoPrizeFlag();
		/** 核销标志 */
		public Boolean getFinishFlag();
	}
	
	/**
	 * 为必须属性赋值
	 */
	public TB_WinPrize properties(MustProperties properties) {
		this.setId(properties.getId());
		this.setPrizeItem(properties.getPrizeItem());
		this.setNoPrizeFlag(properties.getNoPrizeFlag());
		this.setFinishFlag(properties.getFinishFlag());
		return this;
	}
	
	/**
	 *	必须属性构造函数
	 */
	public TB_WinPrize(MustProperties properties) {
		this.properties(properties);
	}
	
	
	/**
	 * 可选单属性赋值接口
	 */
	public static interface OptionalSingleProperties{
		/** 电话 */
		public String getPhone();
		/** 中奖概率% */
		public Double getRate();
		/** 名称 */
		public String getPrizeName();
		/** 图片 */
		public String getImgUrl();
		/** 用户真实姓名 */
		public String getRealName();
		/** 用户昵称 */
		public String getNickName();
		/** 用户类型 */
		public bairui.international.model.type.Type_User getUserType();
		/** 核销时间 */
		public java.util.Date getFinishTime();
		/** 核销者 */
		public bairui.international.model.domain.jpa.TB_Admin getFinishor();
	}
	
	/**
	 * 为可选单属性赋值
	 */
	public TB_WinPrize properties(OptionalSingleProperties properties) {
		this.setPhone(properties.getPhone());
		this.setRate(properties.getRate());
		this.setPrizeName(properties.getPrizeName());
		this.setImgUrl(properties.getImgUrl());
		this.setRealName(properties.getRealName());
		this.setNickName(properties.getNickName());
		this.setUserType(properties.getUserType());
		this.setFinishTime(properties.getFinishTime());
		this.setFinishor(properties.getFinishor());
		return this;
	}
	
	
	
	public TB_WinPrize(MustProperties must, OptionalSingleProperties optionalSingle) {
		this.properties(must);
		this.properties(optionalSingle);
	}
	
	/**
	 * 仅当前必须属性赋值接口
	 */
	public static interface CurrentMustProperties{
		public bairui.international.model.domain.jpa.id.ID_WinPrize getId();
		/** 奖品 */
		public bairui.international.model.domain.jpa.TB_PrizeItem getPrizeItem();
		/** 非奖品标志 */
		public Boolean getNoPrizeFlag();
		/** 核销标志 */
		public Boolean getFinishFlag();
	}
	
	/**
	 * 为仅当前必须属性赋值
	 */
	public TB_WinPrize properties(CurrentMustProperties properties) {
		this.setId(properties.getId());
		this.setPrizeItem(properties.getPrizeItem());
		this.setNoPrizeFlag(properties.getNoPrizeFlag());
		this.setFinishFlag(properties.getFinishFlag());
		return this;
	}
	
	/**
	 * 仅当前可选单属性赋值接口
	 */
	public static interface CurrentOptionalSingleProperties{
		/** 电话 */
		public String getPhone();
		/** 中奖概率% */
		public Double getRate();
		/** 名称 */
		public String getPrizeName();
		/** 图片 */
		public String getImgUrl();
		/** 用户真实姓名 */
		public String getRealName();
		/** 用户昵称 */
		public String getNickName();
		/** 用户类型 */
		public bairui.international.model.type.Type_User getUserType();
		/** 核销时间 */
		public java.util.Date getFinishTime();
		/** 核销者 */
		public bairui.international.model.domain.jpa.TB_Admin getFinishor();
	}
	
	/**
	 * 为仅当前可选单属性赋值
	 */
	public TB_WinPrize properties(CurrentOptionalSingleProperties properties) {
		this.setPhone(properties.getPhone());
		this.setRate(properties.getRate());
		this.setPrizeName(properties.getPrizeName());
		this.setImgUrl(properties.getImgUrl());
		this.setRealName(properties.getRealName());
		this.setNickName(properties.getNickName());
		this.setUserType(properties.getUserType());
		this.setFinishTime(properties.getFinishTime());
		this.setFinishor(properties.getFinishor());
		return this;
	}
	
	public TB_WinPrize(
		@lombok.NonNull com.lianjing.sh.model.uml.model.data.TBSuper_BaseTimeAndOrderValue bean,
		CurrentMustProperties mustProperties,
		CurrentOptionalSingleProperties optionalProperties
	) {
		this(bean);
		this.properties(mustProperties);
		this.properties(optionalProperties);
	}
	
	public TB_WinPrize(
		@lombok.NonNull com.lianjing.sh.model.uml.model.data.TBSuper_BaseTimeAndOrderValue bean
	) {
		update(bean);
	}
	
	public TB_WinPrize update(com.lianjing.sh.model.uml.model.data.TBSuper_BaseTimeAndOrderValue bean){
		this.setCreateTime(bean.getCreateTime());
		this.setModifyTime(bean.getModifyTime());
		this.setOrderValue(bean.getOrderValue());
		return this;
	}
	
	
	/**
	 * 更新属性内部类
	 */
	public abstract class UpdateProperties {
	
		public UpdateProperties() throws Exception {
			Integer orderValue = getOrderValue(TB_WinPrize.this);
			if(isOverride_getOrderValue){
				TB_WinPrize.this.setOrderValue(orderValue);
			}
	
			bairui.international.model.domain.jpa.TB_User user = getUser(TB_WinPrize.this);
			if(isOverride_getUser){
				TB_WinPrize.this.setUser(user);
			}
	
			bairui.international.model.domain.jpa.TB_Prize prize = getPrize(TB_WinPrize.this);
			if(isOverride_getPrize){
				TB_WinPrize.this.setPrize(prize);
			}
	
			bairui.international.model.domain.jpa.TB_PrizeItem prizeItem = getPrizeItem(TB_WinPrize.this);
			if(isOverride_getPrizeItem){
				TB_WinPrize.this.setPrizeItem(prizeItem);
			}
	
			String phone = getPhone(TB_WinPrize.this);
			if(isOverride_getPhone){
				TB_WinPrize.this.setPhone(phone);
			}
	
			Double rate = getRate(TB_WinPrize.this);
			if(isOverride_getRate){
				TB_WinPrize.this.setRate(rate);
			}
	
			String prizeName = getPrizeName(TB_WinPrize.this);
			if(isOverride_getPrizeName){
				TB_WinPrize.this.setPrizeName(prizeName);
			}
	
			String imgUrl = getImgUrl(TB_WinPrize.this);
			if(isOverride_getImgUrl){
				TB_WinPrize.this.setImgUrl(imgUrl);
			}
	
			Boolean noPrizeFlag = getNoPrizeFlag(TB_WinPrize.this);
			if(isOverride_getNoPrizeFlag){
				TB_WinPrize.this.setNoPrizeFlag(noPrizeFlag);
			}
	
			String realName = getRealName(TB_WinPrize.this);
			if(isOverride_getRealName){
				TB_WinPrize.this.setRealName(realName);
			}
	
			String nickName = getNickName(TB_WinPrize.this);
			if(isOverride_getNickName){
				TB_WinPrize.this.setNickName(nickName);
			}
	
			bairui.international.model.type.Type_User userType = getUserType(TB_WinPrize.this);
			if(isOverride_getUserType){
				TB_WinPrize.this.setUserType(userType);
			}
	
			Boolean finishFlag = getFinishFlag(TB_WinPrize.this);
			if(isOverride_getFinishFlag){
				TB_WinPrize.this.setFinishFlag(finishFlag);
			}
	
			java.util.Date finishTime = getFinishTime(TB_WinPrize.this);
			if(isOverride_getFinishTime){
				TB_WinPrize.this.setFinishTime(finishTime);
			}
	
			bairui.international.model.domain.jpa.TB_Admin finishor = getFinishor(TB_WinPrize.this);
			if(isOverride_getFinishor){
				TB_WinPrize.this.setFinishor(finishor);
			}
		}
	
		public TB_WinPrize up(){
			return TB_WinPrize.this;
		}
	
		/** 排序值 */
		private boolean isOverride_getOrderValue = true;
		public Integer getOrderValue(TB_WinPrize it) throws Exception { 
			isOverride_getOrderValue = false; 
			return null;
		}
		/** 用户 */
		private boolean isOverride_getUser = true;
		public bairui.international.model.domain.jpa.TB_User getUser(TB_WinPrize it) throws Exception { 
			isOverride_getUser = false; 
			return null;
		}
		/** 抽奖 */
		private boolean isOverride_getPrize = true;
		public bairui.international.model.domain.jpa.TB_Prize getPrize(TB_WinPrize it) throws Exception { 
			isOverride_getPrize = false; 
			return null;
		}
		/** 奖品 */
		private boolean isOverride_getPrizeItem = true;
		public bairui.international.model.domain.jpa.TB_PrizeItem getPrizeItem(TB_WinPrize it) throws Exception { 
			isOverride_getPrizeItem = false; 
			return null;
		}
		/** 电话 */
		private boolean isOverride_getPhone = true;
		public String getPhone(TB_WinPrize it) throws Exception { 
			isOverride_getPhone = false; 
			return null;
		}
		/** 中奖概率% */
		private boolean isOverride_getRate = true;
		public Double getRate(TB_WinPrize it) throws Exception { 
			isOverride_getRate = false; 
			return null;
		}
		/** 名称 */
		private boolean isOverride_getPrizeName = true;
		public String getPrizeName(TB_WinPrize it) throws Exception { 
			isOverride_getPrizeName = false; 
			return null;
		}
		/** 图片 */
		private boolean isOverride_getImgUrl = true;
		public String getImgUrl(TB_WinPrize it) throws Exception { 
			isOverride_getImgUrl = false; 
			return null;
		}
		/** 非奖品标志 */
		private boolean isOverride_getNoPrizeFlag = true;
		public Boolean getNoPrizeFlag(TB_WinPrize it) throws Exception { 
			isOverride_getNoPrizeFlag = false; 
			return null;
		}
		/** 用户真实姓名 */
		private boolean isOverride_getRealName = true;
		public String getRealName(TB_WinPrize it) throws Exception { 
			isOverride_getRealName = false; 
			return null;
		}
		/** 用户昵称 */
		private boolean isOverride_getNickName = true;
		public String getNickName(TB_WinPrize it) throws Exception { 
			isOverride_getNickName = false; 
			return null;
		}
		/** 用户类型 */
		private boolean isOverride_getUserType = true;
		public bairui.international.model.type.Type_User getUserType(TB_WinPrize it) throws Exception { 
			isOverride_getUserType = false; 
			return null;
		}
		/** 核销标志 */
		private boolean isOverride_getFinishFlag = true;
		public Boolean getFinishFlag(TB_WinPrize it) throws Exception { 
			isOverride_getFinishFlag = false; 
			return null;
		}
		/** 核销时间 */
		private boolean isOverride_getFinishTime = true;
		public java.util.Date getFinishTime(TB_WinPrize it) throws Exception { 
			isOverride_getFinishTime = false; 
			return null;
		}
		/** 核销者 */
		private boolean isOverride_getFinishor = true;
		public bairui.international.model.domain.jpa.TB_Admin getFinishor(TB_WinPrize it) throws Exception { 
			isOverride_getFinishor = false; 
			return null;
		}
	
	}
	
	
	/**
	 * 构造函数
	 */
	public TB_WinPrize() {
	}
	
	public TB_WinPrize(
		@lombok.NonNull bairui.international.model.domain.jpa.id.ID_WinPrize id
	) {
		this.setId(id);
	}
	
	public TB_WinPrize(
		@lombok.NonNull TB_WinPrize bean
	) {
		this.setId(bean.getId());
		this.setCreateTime(bean.getCreateTime());
		this.setModifyTime(bean.getModifyTime());
		this.setOrderValue(bean.getOrderValue());
		this.setUser(bean.getUser());
		this.setPrize(bean.getPrize());
		this.setPrizeItem(bean.getPrizeItem());
		this.setPhone(bean.getPhone());
		this.setRate(bean.getRate());
		this.setPrizeName(bean.getPrizeName());
		this.setImgUrl(bean.getImgUrl());
		this.setNoPrizeFlag(bean.getNoPrizeFlag());
		this.setRealName(bean.getRealName());
		this.setNickName(bean.getNickName());
		this.setUserType(bean.getUserType());
		this.setFinishFlag(bean.getFinishFlag());
		this.setFinishTime(bean.getFinishTime());
		this.setFinishor(bean.getFinishor());
	}
	
	

	/**
	 * 联合主键
	 */
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.EmbeddedId
	@org.hibernate.annotations.Target(bairui.international.model.domain.jpa.id.ID_WinPrize.class)
	private bairui.international.model.domain.jpa.id.ID_WinPrize id;
	
	@com.fasterxml.jackson.databind.annotation.JsonSerialize(using=bairui.international.model.domain.jpa.id.ID_WinPrize.CompositePKSerializer.class)
	public bairui.international.model.domain.jpa.id.ID_WinPrize getId() {
		return this.id;
	}
	public void setId(bairui.international.model.domain.jpa.id.ID_WinPrize id) {
		this.id = id;
		if(null != this.id){
			this.setUser(this.id.getUser());
			this.setPrize(this.id.getPrize());
		}
	}
	public void setId_only(bairui.international.model.domain.jpa.id.ID_WinPrize id) {
		this.id = id;
	}
	


	/**
	 * 属性
	 */
	@com.lianjing.sh.model.common.annotation.Comment("用户")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne(optional=false)
	@javax.persistence.JoinColumn(insertable=false, updatable=false)
	private bairui.international.model.domain.jpa.TB_User user;

	@com.lianjing.sh.model.common.annotation.Comment("抽奖")
	@com.lianjing.sh.processing.info.annotation.InfoComment("抽奖")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne(optional=false)
	@javax.persistence.JoinColumn(insertable=false, updatable=false)
	private bairui.international.model.domain.jpa.TB_Prize prize;

	@com.lianjing.sh.model.common.annotation.Comment("奖品")
	@com.lianjing.sh.processing.info.annotation.InfoComment("奖品")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne(optional=false)
	private bairui.international.model.domain.jpa.TB_PrizeItem prizeItem;

	@com.lianjing.sh.model.common.annotation.Comment("电话")
	@com.lianjing.sh.processing.info.annotation.InfoComment("电话")
	@javax.persistence.Column(name="phone", length=20)
	private String phone;

	@com.lianjing.sh.model.common.annotation.Comment("中奖概率%")
	@com.lianjing.sh.processing.info.annotation.InfoComment("中奖概率%")
	@javax.persistence.Column(name="rate")
	private Double rate;

	@com.lianjing.sh.model.common.annotation.Comment("名称")
	@com.lianjing.sh.processing.info.annotation.InfoComment("名称")
	@javax.persistence.Column(name="prizeName", length=30)
	private String prizeName;

	@com.lianjing.sh.model.common.annotation.Comment("图片")
	@com.lianjing.sh.processing.info.annotation.InfoComment("图片")
	@javax.persistence.Column(name="imgUrl", length=100)
	private String imgUrl;

	@com.lianjing.sh.model.common.annotation.Comment("非奖品标志")
	@com.lianjing.sh.processing.info.annotation.InfoComment("非奖品标志")
	@javax.persistence.Column(name="noPrizeFlag", nullable=false)
	private Boolean noPrizeFlag;

	@com.lianjing.sh.model.common.annotation.Comment("用户真实姓名")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户真实姓名")
	@javax.persistence.Column(name="realName", length=100)
	private String realName;

	@com.lianjing.sh.model.common.annotation.Comment("用户昵称")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户昵称")
	@javax.persistence.Column(name="nickName", length=100)
	private String nickName;

	@com.lianjing.sh.model.common.annotation.Comment("用户类型")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户类型")
	@javax.persistence.Enumerated(javax.persistence.EnumType.STRING)
	@javax.persistence.Column(name="userType")
	private bairui.international.model.type.Type_User userType;

	@com.lianjing.sh.model.common.annotation.Comment("核销标志")
	@com.lianjing.sh.processing.info.annotation.InfoComment("核销标志")
	@javax.persistence.Column(name="finishFlag", nullable=false)
	private Boolean finishFlag;

	@com.lianjing.sh.model.common.annotation.Comment("核销时间")
	@com.lianjing.sh.processing.info.annotation.InfoComment("核销时间")
	@javax.persistence.Column(name="finishTime")
	private java.util.Date finishTime;

	@com.lianjing.sh.model.common.annotation.Comment("核销者")
	@com.lianjing.sh.processing.info.annotation.InfoComment("核销者")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne()
	private bairui.international.model.domain.jpa.TB_Admin finishor;

	/** get[用户] */
	public bairui.international.model.domain.jpa.TB_User getUser() {
		return this.user;
	}

	/** get[抽奖] */
	public bairui.international.model.domain.jpa.TB_Prize getPrize() {
		return this.prize;
	}

	/** get[奖品] */
	public bairui.international.model.domain.jpa.TB_PrizeItem getPrizeItem() {
		return this.prizeItem;
	}

	/** get[电话] */
	public String getPhone() {
		return this.phone;
	}

	/** get[中奖概率%] */
	public Double getRate() {
		return this.rate;
	}

	/** get[名称] */
	public String getPrizeName() {
		return this.prizeName;
	}

	/** get[图片] */
	public String getImgUrl() {
		return this.imgUrl;
	}

	/** get[非奖品标志] */
	public Boolean getNoPrizeFlag() {
		return this.noPrizeFlag;
	}

	/** get[用户真实姓名] */
	public String getRealName() {
		return this.realName;
	}

	/** get[用户昵称] */
	public String getNickName() {
		return this.nickName;
	}

	/** get[用户类型] */
	public bairui.international.model.type.Type_User getUserType() {
		return this.userType;
	}

	/** get[核销标志] */
	public Boolean getFinishFlag() {
		return this.finishFlag;
	}

	/** get[核销时间] */
	public java.util.Date getFinishTime() {
		return this.finishTime;
	}

	/** get[核销者] */
	public bairui.international.model.domain.jpa.TB_Admin getFinishor() {
		return this.finishor;
	}

	/** set[用户] */
	public void setUser(bairui.international.model.domain.jpa.TB_User user) {
		this.user = user;
	}

	/** set[抽奖] */
	public void setPrize(bairui.international.model.domain.jpa.TB_Prize prize) {
		this.prize = prize;
	}

	/** set[奖品] */
	public void setPrizeItem(bairui.international.model.domain.jpa.TB_PrizeItem prizeItem) {
		this.prizeItem = prizeItem;
	}

	/** set[电话] */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/** set[中奖概率%] */
	public void setRate(Double rate) {
		this.rate = rate;
	}

	/** set[名称] */
	public void setPrizeName(String prizeName) {
		this.prizeName = prizeName;
	}

	/** set[图片] */
	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	/** set[非奖品标志] */
	public void setNoPrizeFlag(Boolean noPrizeFlag) {
		this.noPrizeFlag = noPrizeFlag;
	}

	/** set[用户真实姓名] */
	public void setRealName(String realName) {
		this.realName = realName;
	}

	/** set[用户昵称] */
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	/** set[用户类型] */
	public void setUserType(bairui.international.model.type.Type_User userType) {
		this.userType = userType;
	}

	/** set[核销标志] */
	public void setFinishFlag(Boolean finishFlag) {
		this.finishFlag = finishFlag;
	}

	/** set[核销时间] */
	public void setFinishTime(java.util.Date finishTime) {
		this.finishTime = finishTime;
	}

	/** set[核销者] */
	public void setFinishor(bairui.international.model.domain.jpa.TB_Admin finishor) {
		this.finishor = finishor;
	}

	public void assignUser(bairui.international.model.domain.jpa.TB_User user) {
		if(null != user){
			user.addWinPrizes(this);
		}
		this.setUser(user);
	}
	

	public void assignPrize(bairui.international.model.domain.jpa.TB_Prize prize) {
		if(null != prize){
			prize.addWinPrizes(this);
		}
		this.setPrize(prize);
	}
	

	public void assignPrizeItem(bairui.international.model.domain.jpa.TB_PrizeItem prizeItem) {
		if(null != prizeItem){
			prizeItem.addWinPrizes(this);
		}
		this.setPrizeItem(prizeItem);
	}
	


	
	
	

	/** take[用户] */
	public bairui.international.model.domain.jpa.TB_User takeUser(){
		if(null == this.user){
			this.user = new bairui.international.model.domain.jpa.TB_User();
		}
		return this.user;
	}
	
	/** take[抽奖] */
	public bairui.international.model.domain.jpa.TB_Prize takePrize(){
		if(null == this.prize){
			this.prize = new bairui.international.model.domain.jpa.TB_Prize();
		}
		return this.prize;
	}
	
	/** take[奖品] */
	public bairui.international.model.domain.jpa.TB_PrizeItem takePrizeItem(){
		if(null == this.prizeItem){
			this.prizeItem = new bairui.international.model.domain.jpa.TB_PrizeItem();
		}
		return this.prizeItem;
	}
	
	/** take[核销者] */
	public bairui.international.model.domain.jpa.TB_Admin takeFinishor(){
		if(null == this.finishor){
			this.finishor = new bairui.international.model.domain.jpa.TB_Admin();
		}
		return this.finishor;
	}
	
	/** must[用户] */
	public bairui.international.model.domain.jpa.TB_User mustUser() {
		return this.user;
	}
	
	/** must[抽奖] */
	public bairui.international.model.domain.jpa.TB_Prize mustPrize() {
		return this.prize;
	}
	
	/** must[奖品] */
	public bairui.international.model.domain.jpa.TB_PrizeItem mustPrizeItem() {
		return this.prizeItem;
	}
	
	/** optional[核销者] */
	public java.util.Optional<bairui.international.model.domain.jpa.TB_Admin> optionalFinishor() {
		return java.util.Optional.ofNullable(this.finishor);
	}
	

	/**
	 * 复写 hashCode
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		return prime * result + ((this.getId() == null) ? 0 : this.getId().hashCode());
	}
	
	/**
	 * 复写 equals
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj){
			return true;
		}
		if (obj == null){
			return false;
		}
		if (getClass() != obj.getClass()){
			return false;
		}
		TB_WinPrize other = (TB_WinPrize) obj;
		if (this.getId() == null) {
			return false;
		} else if (!this.getId().equals(other.getId())){
			return false;
		}
		return true;
	}
	

	/**
	 * 用来覆盖toString()的输出
	 */
	@javax.persistence.Transient
	private String toString;
	
	public void setToString(String toString) {
		this.toString = toString;
	}
	
	/**
	 * 复写 toString
	 */
	@Override
	public String toString() {
		if(null != this.toString){
			return this.toString;
		}
		return super.toString();
	}	

	@javax.persistence.PrePersist
	public void prePersist() {
		this.setCreateTime(new java.util.Date());
		this.setModifyTime(new java.util.Date());
	}
	
	@javax.persistence.PreUpdate
	public void preUpdate() {
		this.setModifyTime(new java.util.Date());
	}



}
